package com.xinchao.ck_mips.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.xinchao.ck_mips.App;
import com.xinchao.devicemanage.DeviceManager;

/**
 * Created by wq on 2019/7/3.
 * 定时关机
 */
public class OffMachineReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (action.equals("intent_alram_off")) {
            //执行关机任务
            if (DeviceManager.iBaseMachine == null) {
                DeviceManager.iBaseMachine = App.iBaseMachine;
            }
            DeviceManager.iBaseMachine.power_off();
        }
    }
}
